home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / recode.lha / recode-3.2.4 / ltexasci.l < prev    next >
Text File  |  1992-08-26  |  2KB  |  51 lines

  1. %{
  2. /* Conversion of files between different charsets and usages.
  3.    Copyright (C) 1990 Free Software Foundation, Inc.
  4.    Francois Pinard <pinard@iro.umontreal.ca>, 1988.
  5.  
  6.    This program is free software; you can redistribute it and/or modify
  7.    it under the terms of the GNU General Public License as published by
  8.    the Free Software Foundation; either version 2, or (at your option)
  9.    any later version.
  10.  
  11.    This program is distributed in the hope that it will be useful, but
  12.    WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.    General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU General Public License
  17.    along with this program; if not, write to the Free Software
  18.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. */
  20.  
  21. #define STEP    latex_ascii
  22.  
  23. extern int diacritics_only;
  24.  
  25. %}
  26.  
  27. After            [ \t]*(\{\})?
  28.  
  29. %%
  30. \\#            { if (diacritics_only) ECHO; else output ('#'); }
  31. \\\$            { if (diacritics_only) ECHO; else output ('$'); }
  32. \\%            { if (diacritics_only) ECHO; else output ('%'); }
  33. \\&            { if (diacritics_only) ECHO; else output ('&'); }
  34. \\_            { if (diacritics_only) ECHO; else output ('_'); }
  35. \\\{            { if (diacritics_only) ECHO; else output ('{'); }
  36. \\\}            { if (diacritics_only) ECHO; else output ('}'); }
  37.  
  38. \\backslash{After}    { if (diacritics_only) ECHO; else output ('\\'); }
  39.  
  40.  
  41. \\['`^"]\{\\i\}        { output ('i'); output ('\b'); output (yytext[1]); }
  42. \\['`^"]\\i{After}    { output ('i'); output ('\b'); output (yytext[1]); }
  43. \\['`^"]\{.\}        { output (yytext[3]); output ('\b');
  44.               output (yytext[1]); }
  45. \\['`^"].        { output (yytext[2]); output ('\b');
  46.               output (yytext[1]); }
  47.  
  48. \\c\{.\}        { output (','); output ('\b'); output (yytext[3]); }
  49. \\c[ /t/n]+.        { output (','); output ('\b');
  50.               output (yytext[yyleng-1]); }
  51.